<?php

namespace Modules\Common\Models\Validation;


/**
 *@property int $id
 *@property string $title
 *@property string $content
 *@property int $type
 *@property int $source
 *@property int $status
 *@property int $user_id
 *@property int $user_type
 *@property string $user_ip
 *@property string $user_agent
 *@property string $user_name
 *@property string $user_mobile
 *@property string $route
 *@property string $method
 *@property int $reason_type
 *@property string $created_at
 *@property string $updated_at
 *@property string $deleted_at
 */
trait SystemErrorValidation 
{


    public function createRules()
    {
         return [
            'rules' => [
                'title'=>'between:0,255',
                'content'=>'required',
                'type'=>'integer|in:0,1,2',
                'source'=>'integer|in:0,1,2,3,4,5,6,7',
                'status'=>'integer|in:0,1,2,3',
                'user_id'=>'integer',
                'user_type'=>'integer|in:0,1,2,3,4,5',
                'user_ip'=>'between:0,32',
                'user_agent'=>'between:0,1024',
                'user_name'=>'between:0,7',
                'user_mobile'=>'between:0,11|mobile',
                'route'=>'between:0,128',
                'method'=>'between:0,10',
                'reason_type'=>'integer|in:0,1,2,3,4,5',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'title'=>'between:0, 255',
                'content'=>'',
                'type'=>'integer|in:0,1,2',
                'source'=>'integer|in:0,1,2,3,4,5,6,7',
                'status'=>'integer|in:0,1,2,3',
                'user_id'=>'integer',
                'user_type'=>'integer|in:0,1,2,3,4,5',
                'user_ip'=>'between:0, 32',
                'user_agent'=>'between:0, 1024',
                'user_name'=>'between:0, 7',
                'user_mobile'=>'between:0, 11|mobile',
                'route'=>'between:0, 128',
                'method'=>'between:0, 10',
                'reason_type'=>'integer|in:0,1,2,3,4,5',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
